package demo3;

/**
 * @description:测试泛型方法的使用
 * @author:Mr.Cat
 * @create:2021-11-04 18:40
 **/
public class FxFunction<E> {
    E e;

    public <T> T fx(T t){
        System.out.println(t);
        return t;
    }
    public static void main(String[] args) {
        FxFunction<Integer> function = new FxFunction();
        function.e=456;
        System.out.println(function.e);
        String name = "LX";
        int i=123;
        function.fx(name);
        function.fx(i);
        int a=789;
        System.out.println(function.fx(a));
    }
}

